#pragma once
#include <ros/ros.h>
#include <memory>
#include <control_msgs/control_msg.h>
#include <control_msgs/control_state_msg.h>
#include "localization_msgs/localization_msg.h"
#include "actuator_msgs/actuator_msg.h"
#include "tf/tf.h"
#include "geometry_msgs/PoseWithCovarianceStamped.h"
#include "geometry_msgs/PoseStamped.h"
#include "simulation_model/model_base.h"
#include "simulation_model/point_model.h"

class SimulationMode
{
public:
    inline SimulationMode(ros::NodeHandle &nh):nh_(nh) { Init(); };
    ~SimulationMode(){};
    void Start();

private:
    ros::NodeHandle nh_;
    ros::NodeHandle private_nh_;

	ros::Publisher pub_pose_;
	ros::Publisher pub_local_;
	ros::Publisher pub_actuator_;
	ros::Publisher pub_tray_pose_;
	ros::Publisher pub_actuator_cmd_;

	ros::Subscriber sub_control_;
	ros::Subscriber sub_init_pose_;

    std::shared_ptr<PointModel> model_base_;
    float v_;
	float w_;
	float v_toward_;
	// SteersCmd steers_cmd_;
	bool work_enable_;
	float work_target_;
	float work_target_speed_;
	float work_state_;
	float fork_forward_pose_;
	//上装相对于车体的旋转角度
	float up_angle_speed_;
	bool charge_enable_;
	bool is_charge_;
	bool is_auto_;
	geometry_msgs::Pose pose_;
	localization_msgs::localization_msg localization_;
	actuator_msgs::actuator_msg actuator_;

    void Init();
	void ControlCallback(const control_msgs::control_msg &msg);
	void InitPoseCallback(const geometry_msgs::PoseWithCovarianceStamped &msg);
};